<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="../../org/angular.min.js"></script>
    <script src="../../org/angular-ui-router.min.js"></script>
</head>

<body ng-app="app" ng-controller="ctrl">
    <div ui-view></div>

    <script>
        var m = angular.module('app', ['ui.router']);
        m.config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $urlRouterProvider) {
            //默认路由
            $urlRouterProvider.otherwise('/index');
            //定义路由规则
            $stateProvider.state('default', {
                url: '/index',
                template: '<h1>laozhou</h1>'
            })
        }])
        m.controller('ctrl', ['$scope', function($scope) {

        }])
    </script>
</body>

</html>
